package informationplatform

class SystemController {
	def sessionFactory
	def migrationService
	
    def index() { }
	
	
	def clearCache(){
		def cache =sessionFactory.getCache()
		cache.evictEntityRegions()
		cache.evictCollectionRegions()
		cache.evictDefaultQueryRegion()
		cache.evictQueryRegions()
		
		render(contentType:'text/json'){[status:'ok', message:'已经清除所有持久缓存!']}
	}
	
	def migration(){
		migrationService.migrationMain()
		render(contentType:'text/json'){[status:'ok', message:'导入成功!']}
	}
}
